﻿<phone:PhoneApplicationPage
    x:Class="HeatMapTestApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    
    xmlns:m="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
    
    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="ComboBoxItem">
            <Setter Property="FontSize" Value="30"/>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True">
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Test Data Size" Click="TestDataSizeBtn_Clicked"/>
                <shell:ApplicationBarMenuItem Text="Radius" Click="RadiusBtn_Clicked"/>
                <shell:ApplicationBarMenuItem Text="Intensity" Click="IntensityBtn_Clicked"/>
                <shell:ApplicationBarMenuItem Text="Opacity" Click="OpacityBtn_Clicked"/>
                <shell:ApplicationBarMenuItem Text="Heat Gradients" Click="HeatGrdBtn_Clicked"/>
                <shell:ApplicationBarMenuItem Text="Background Color" Click="BackgroundBtn_Clicked"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <m:Map Name="MyMap"/>

        <Grid Name="TestDataPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Test Data Size" FontSize="35" Margin="0,10"/>
                <ComboBox SelectionChanged="TestDataSize_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="100"/>
                        <ComboBoxItem Content="500"/>
                        <ComboBoxItem Content="5000"/>
                        <ComboBoxItem Content="10000" IsSelected="True"/>
                        <ComboBoxItem Content="25000"/>
                        <ComboBoxItem Content="50000"/>
                        <ComboBoxItem Content="75000"/>
                        <ComboBoxItem Content="100000"/>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>

        <Grid Name="IntensityPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Intensity" FontSize="35" Margin="0,10"/>
                <ComboBox SelectionChanged="Intensity_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="0.25"/>
                        <ComboBoxItem Content="0.5" IsSelected="True"/>
                        <ComboBoxItem Content="0.75"/>
                        <ComboBoxItem Content="1"/>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>
    
        <Grid Name="RadiusPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Radius (KM)" FontSize="35" Margin="0,10"/>
                <ComboBox SelectionChanged="Radius_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="1"/>
                        <ComboBoxItem Content="10"/>
                        <ComboBoxItem Content="50"/>
                        <ComboBoxItem Content="100"/>
                        <ComboBoxItem Content="150"/>
                        <ComboBoxItem Content="200"/>
                        <ComboBoxItem Content="250" IsSelected="True"/>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>

        <Grid Name="OpacityPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Opacity" FontSize="35" Margin="0,10,0,0"/>
                <ComboBox SelectionChanged="Opacity_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="0"/>
                        <ComboBoxItem Content="0.25"/>
                        <ComboBoxItem Content="0.5"/>
                        <ComboBoxItem Content="1" IsSelected="True"/>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>
        
        <Grid Name="HeatGradientPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Heat Gradients" FontSize="35" Margin="0,10"/>
                <ComboBox SelectionChanged="Gradient_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="Color Spectrum (Default)" Height="50" IsSelected="True" Foreground="White">
                            <ComboBoxItem.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="Navy" Offset="0"/>
                                    <GradientStop Color="Blue" Offset="0.25"/>
                                    <GradientStop Color="Green" Offset="0.5"/>
                                    <GradientStop Color="Yellow" Offset="0.75"/>
                                    <GradientStop Color="Red" Offset="1"/>
                                </LinearGradientBrush>
                            </ComboBoxItem.Background>
                        </ComboBoxItem>
                        <ComboBoxItem Content="Incandescent" Height="50" Foreground="White">
                            <ComboBoxItem.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="Black" Offset="0"/>
                                    <GradientStop Color="DarkRed" Offset="0.33"/>
                                    <GradientStop Color="Yellow" Offset="0.66"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </ComboBoxItem.Background>
                        </ComboBoxItem>
                        <ComboBoxItem Content="Heated Metal" Height="50" Foreground="White">
                            <ComboBoxItem.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="Black" Offset="0"/>
                                    <GradientStop Color="Purple" Offset="0.4"/>
                                    <GradientStop Color="Red" Offset="0.6"/>
                                    <GradientStop Color="Yellow" Offset="0.8"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </ComboBoxItem.Background>
                        </ComboBoxItem>
                        <ComboBoxItem Content="Sunrise" Height="50" Foreground="White">
                            <ComboBoxItem.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="Red" Offset="0"/>
                                    <GradientStop Color="Yellow" Offset="0.66"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </ComboBoxItem.Background>
                        </ComboBoxItem>
                        <ComboBoxItem Content="Stepped Colors" Height="50" Foreground="White">
                            <ComboBoxItem.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="Navy" Offset="0"/>
                                    <GradientStop Color="Navy" Offset="0.25"/>
                                    <GradientStop Color="Green" Offset="0.25"/>
                                    <GradientStop Color="Green" Offset="0.5"/>
                                    <GradientStop Color="Yellow" Offset="0.5"/>
                                    <GradientStop Color="Yellow" Offset="0.75"/>
                                    <GradientStop Color="Red" Offset="0.75"/>
                                    <GradientStop Color="Red" Offset="1"/>
                                </LinearGradientBrush>
                            </ComboBoxItem.Background>
                        </ComboBoxItem>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>

        <Grid Name="BackgroundPanel" Visibility="Collapsed" Background="Black" Opacity="0.8">
            <StackPanel Margin="40">
                <TextBlock Text="Background" FontSize="35" Margin="0,10"/>
                <ComboBox SelectionChanged="Background_Changed">
                    <ComboBox.Items>
                        <ComboBoxItem Content="Transparent" Height="50" IsSelected="True" Background="Transparent"/>
                        <ComboBoxItem Content="Black" Height="50" Background="#FF000000" Foreground="White"/>
                        <ComboBoxItem Content="White" Height="50" Background="#88FFFFFF"/>
                        <ComboBoxItem Content="Gray" Height="50" Background="#88888888"/>
                        <ComboBoxItem Content="Blue" Height="50" Background="#8800A2FF"/>
                    </ComboBox.Items>
                </ComboBox>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>